package com.ziyun.job;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;


@Slf4j
@SpringBootApplication
@ComponentScan(basePackages= {"com.cloud.bus.*","com.service.cache.*","io.renren.*","com.ziyun.erp.*","com.ziyun.admin.web.*",
		"com.service.pay.*","com.service.utils.*","com.service.ucenter.*","com.service.timer.*","com.ziyun.job.*"}
		)
@MapperScan(basePackages = {"io.renren.modules.*.dao","com.ziyun.erp.modules.**.dao","com.service.ucenter.dao.mapper","com.ziyun.job.modules.*.dao"})
@EnableEurekaClient
@EnableFeignClients(basePackages = {"com.service.ucenter.api","com.service.order.api","com.service.goods.api","com.service.timer.api"})
public class ZiYunJobApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(ZiYunJobApplication.class, args);
		log.info(">>>>> Ziyun-JOB 启动完成 <<<<<");
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(ZiYunJobApplication.class);
	}
}
